@echo off>$
set m=bi20190723102633
title Build j8ftp - %m%

cd /d %~dp0
call ..\se.bat
windres %~n0.rc -O coff %~n0.res
gcc -O2 -mwindows *.c -static ../bo/xSeal.a %~n0.res -o %~n0 -lws2_32

if errorlevel 0 (
  for /f "tokens=1,2,3,*" %%a in (VIPlus.h) do (
    if "%%b"=="VI_BUILD" (
      set /a n=%%c+1
      call echo %%a %%b %%n%%>>$
    ) else (
      if "%%b"=="COPYRIGHT" (
        echo %%a %%b %m%>>$
      ) else (
        if "%%d"=="" (
          echo %%a %%b %%c>>$
        ) else (
          echo %%a %%b %%c %%d>>$
        )
      )
    )
  )

  move /y $ VIPlus.h>nul
  %~n0 -ip:192.168.106.9
)